<?php
namespace app\index\controller;

use think\Request;
use think\View;
use app\index\model\Index AS IndexModel;
class Index
{
    public function index()
    {
	    $view = new View();
	    return $view->fetch('index');
    }
    //申请加入
    public function addenroll(){
    	$request = Request::instance();
    	$params =$request->param();
		$result = IndexModel::addEnroll($params);
		if($result){
          	$res = [
            	'result'=>1
            ];
			return json($res);
		}else{
			$res = [
            	'result'=>0
            ];
			return json($res);
		}
    }
	public function order()
	{
		$view = new View();
		return $view->fetch('order');
	}
    //申请预约
	public function addorder(){
		$request = Request::instance();
		$params =$request->param();
		$result = IndexModel::addorder($params);
		if($result){
			$res = [
				'result'=>1
			];
			return json($res);
		}else{
			$res = [
				'result'=>0
			];
			return json($res);
		}
	}

}
